home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS09.ADF / Text / Install68010 < prev    next >
Text File  |  1986-05-22  |  17KB  |  336 lines

  1.                         AMIGA (tm) TECHNICAL NOTE                  29-Mar-86
  2.  
  3.           Upgrading an AMIGA A1000 with a Motorola MC68010L8
  4.  
  5.                             by Thad Floryan
  6.  
  7.  
  8. For quite awhile now, I've been experimenting using an MC68010L8 in place of
  9. the MC68000 in my Amiga.  The benefits of the MC68010 are great, but several
  10. "problems" with the MC68010 upgrade have held me back from recommending this
  11. simple enhancement to everyone.  Now, the final quirk has been solved, and I
  12. am recommending the upgrade to everyone!
  13.  
  14. This document has several parts, ALL of which must be read and understood by
  15. anyone wishing to perform the upgrade or contract for someone to perform the
  16. upgrade for you.  Additionally, there are several files which accompany this
  17. technical note:
  18.  
  19.                        DeciGEL
  20.                        DeciGEL.asm
  21.                        DeciGEL.make
  22.  
  23. The several parts of this document are:
  24.  
  25.          I.  The MC68010 hardware upgrade
  26.  
  27.         II.  The MC68010 software upgrade 
  28.  
  29.        III.  Copy of Motorola's MC68000 Micro Minutes MM-444-02, entitled
  30.              "Advantages of Upgrading an MC68000 to an MC68010".
  31.  
  32.         IV.  Side notes
  33.  
  34.          V.  Trademark notices
  35.  
  36. --------------------------------------------------------------------------
  37.  
  38.                            ** DISCLAIMER **
  39.  
  40. The modification and details described in this technical note are provided
  41. "as is", without warranty of any kind, either expressed or implied, inclu-
  42. ding, but not limited to, the implied warranties of fitness for a particu-
  43. lar purpose.  The entire risk as to the results and performance of the mo-
  44. dification is assumed by you.  In no event will I, Thaddeus P. Floryan Jr,
  45. be liable for direct, indirect, incidental or consequential damages resul-
  46. ting from the use or application of this information.
  47.  
  48. --------------------------------------------------------------------------
  49.  
  50. I. The MC68010 hardware upgrade
  51.  
  52. The MC68010 is pin-for-pin compatible with the MC68000 installed in all
  53. Amiga Model A1000 PCs.  The hardware upgrade consists of replacing the
  54. MC68000 with the MC68010.
  55.  
  56.  
  57.                             ** CAUTION **
  58.  
  59.          The internals of the Amiga are sensitive to static
  60.          and are fragile; working on a computer is not like
  61.          working on your car.  Also, opening the Amiga will
  62.          void your warranty.  It may be worth your peace of
  63.          mind to contract an experienced technician for the
  64.          hardware part of this upgrade.  Common sense and a
  65.          good mechanical aptitude are essential.  Take your
  66.          time and do not rush; restrain your excitement for
  67.          later, after the MC68010 is installed.
  68.  
  69. To open the Amiga, the five screws on the underside of the case must be
  70. removed.  Releasing the cover can be tricky; examine the left side of the
  71. case near the power switch (front side corner) and also 10 inches further
  72. back along the seam and note the tabs: push in until they separate, then
  73. lift the cover up toward the right side of the case and release the tabs
  74. there.  The metal RFI shield covers the entire PC board and must be removed
  75. to gain access to the MC68000.  Remove all the screws along its edge, and
  76. also straighten out the tabs which protrude upwards through the shield, then
  77. lift and remove the shield; be sure to note where each screw is supposed to
  78. be located as there are several types of screws.  The disk drive must also
  79. be removed since it sits over one edge of the MC68000.  First unplug the
  80. two cables (power and signal) after noting the orientation so that they can
  81. be replaced correctly later.  Now remove all screws fastening the disk
  82. drive and lift it up and out: NOTE that the wires to the LED are still
  83. fastened; these do not need to be removed if you turn the drive upside down
  84. and lay it on a thick book alongside the right side of the Amiga case.  Pry
  85. the MC68000 out and replace it with a MC68010L8.  Reverse all the previous
  86. steps to reassemble the Amiga; the tabs which protrude through the RFI
  87. shield need not be twisted back into place.
  88.  
  89. Reconnect all the cables to the Amiga.  Powerup the Amiga and boot with your
  90. usual Kickstart and Workbench disks.  Verify that the system appears to be
  91. working as normal.  Now, either from the Workbench or CLI, startup the
  92. CALCULATOR tool, and perform the operation:  " 9 * 3 = ".  There should be
  93. a software failure; this indicates the MC68010 is running correctly because
  94. the CALCULATOR supplied with V1.1 uses a "MOVE SR,ea" instruction which is
  95. invalid in user-mode with a MC68010.  Reboot the Workbench and proceed now
  96. to section II, software upgrade.
  97.  
  98. If you do not experience the symptoms as described above, there may be
  99. several reasons:
  100.  
  101.       1.  you re-installed the MC68000 instead of the MC68010,
  102.  
  103.       2.  the MC68010 is "dead", or
  104.  
  105.       3.  something else inside the Amiga has been damaged.
  106.  
  107. At this point, you are on your own.  My advice is to re-install the MC68000
  108. and verify that your system works again; if it does, then your MC68010 chip
  109. may be bad.  If your system still does not operate with the MC68000 back in,
  110. then you gotta heap of trouble.  Re-read the DISCLAIMER above, and seek
  111. competent technical service.
  112.  
  113. ---------------------------------------------------------------------------
  114.  
  115. II. The MC68010 software upgrade
  116.  
  117.  
  118. Beginning with V1.1 of Kickstart and Workbench, Commodore-Amiga "officially"
  119. supports operation of the MC68000, MC68010 and MC68020 CPU chips in the
  120. Amiga Model A1000 per:
  121.  
  122.        "With the exception of the Calculator, software in the 1.1 release
  123.         is compatible with the 68010 and 68020 processors.  Application
  124.         programmers wishing to take advantage of such products should be
  125.         sure to use the Exec GetCC() function to get the processor condi-
  126.         tion codes.  (GetCC() handles the differences between the proces-
  127.         sors such as the fact that "MOVE SR," is an invalid user mode
  128.         operation in the 68010 and 68020.)  In addition, programmers
  129.         should be sure to NOT use the upper 8 bits of a pointer for
  130.         storing unrelated information, since the 68020 uses all 32 bits
  131.         for addressing.
  132.  
  133.         = For those doing systems work, Exec maintains flags in the
  134.           AttnFlags field of ExecBase which describe the type of processor
  135.           in your machine.  Exec's coldstart procedure will update certain
  136.           library entry vectors as neccessry to maintain compatibility.
  137.           If you write code that uses the Supervisor() function, keep in
  138.           mind that your stack frame is processor dependent.  Use the
  139.           SuperState() function for processor independent supervisor mode
  140.           entry.
  141.  
  142.         = V1.1 ROMWack will correctly display information for 68010/68020
  143.           address and bus errors.
  144.         "
  145.  
  146. OK, as you can see, simply by having installed the MC68010, you will be able
  147. to use most Amiga system software without any problems.  But, the CALCULATOR
  148. and other programs loaded with libraries using "MOVE SR,ea" will cause your
  149. system to go to lunch with the Guru.  This is the reason I haven't
  150. encouraged people to upgrade their Amigas until now; only a knowledgeable
  151. person would have been able to either live with the occasional problem, or
  152. rebuild the software to not use the "MOVE SR,ea" instructions.
  153.  
  154. So what happened all of a sudden to change my mind?  Simply that one clever
  155. person has developed a short and elegant software solution that prevents
  156. the "MOVE SR,ea" instructions from crashing your system.  "How," you may
  157. ask, "is this done?".  It's done by inserting a "wedge" that intercepts
  158. instruction privilege violations, examining the offending instruction for
  159. the presence of "MOVE SR,ea" and, if found, replacing that instruction in
  160. memory with a "MOVE CCR,ea" and resuming at the point of failure.  Since the
  161. only valid use of the system status register (SR) in a user-mode program
  162. would be to get the condition codes, the assumption made by the "wedge" is
  163. a reasonable one.  And, it works!  I've been testing ALL the cases that
  164. failed previously with the MC68010 in the Amiga and they ALL perform
  165. correctly now.
  166.  
  167. I have included 3 programs with this technical note:
  168.  
  169.                 DeciGEL         public domain, author: Scott Turner
  170.                 DeciGEL.asm     public domain, author: Scott Turner
  171.                 DeciGEL.make    public domain, author: Scott Turner
  172.  
  173. DeciGEL is the "wedge" program that needs to be placed in the "c" directory
  174. of your workbench disk; DeciGEL.asm is the Assembler source file, and the
  175. DeciGEL.make is an EXECUTE file that will recreate DeciGEL from DeciGEL.asm.
  176. It is best to include a line in "s/startup-sequence" on your Workbench disk 
  177. that will call DeciGEL.  For example:
  178.  
  179.                echo "Workbench disk.  Release 1.1"
  180.                echo " "
  181.                echo "Use Preferences tool to set date"
  182.                echo " "
  183.                DeciGEL
  184.                  .
  185.                  .
  186.  
  187. The DeciGEL program resides in the 'progs' subdirectory of this AMICUS_#9 
  188. disk, simply use the CLI to copy it to the 'c' directory on the disk you 
  189. wish to boot from.
  190.  
  191. With the MC68010 installed and DeciGEL "wedged", your Amiga should operate
  192. anywheres from 8% to 50% faster depending on what you're doing.  Note that
  193. the "Boing!" demo will not be faster since its timing is synchronized to
  194. the vertical framing of the monitor's clocking which is FIXED per NTSC TV
  195. standards!  The biggest benefits of the MC68010 upgrade will occur with
  196. heavy number-crunching applications, such as spread sheets and Mandelbrot
  197. picture generations.   Enjoy!
  198.  
  199. --------------------------------------------------------------------------
  200.  
  201. III. M68000 MICRO MINUTES         (c) Motorola                   MM-444-02
  202.  
  203.            Advantages of Upgrading an MC68000 to an MC68010
  204.  
  205.  
  206. There are several ways a system's performance can be upgraded.  Some are
  207. software related, such as lowering operating system overhead, obtaining
  208. better quality language compilers, wisely designing application programs,
  209. and coding applications more efficiently.  Others are hardware related,
  210. such as adding memory, improving I/O channel data rates, increasing mass
  211. storage speed and capacity, reducing memory access times, and upgrading
  212. the system processor's clock frequency.
  213.  
  214. When considering an MC68000 system upgrade to higher performance, the
  215. obvious thought is to redesign for a higher frequency MC68000.  For example,
  216. a current MC68000 system running at 10 MHz could be redesigned to run at
  217. 12.5 MHz, thereby increasing system throughput by 25%.  The "obvious solu-
  218. tion", however, is not necessarily the most appropriate or cost-effective
  219. once several factors are taken into consideration and alternative solutions
  220. examined.
  221.  
  222. The speed-up of a system clock will not be effective unless the system's
  223. memory access time is also improved.  The performance of the MC68000 is
  224. strictly limited by the bus speed, and if no improvement in memory speeds
  225. are available, then an increase in system clock speed will lead to 
  226. negligible improvement in the overall result.  A 10 MHz processor running
  227. with no "wait states" utilizes a 400 nS bus cycle (4 clocks x 100 nS/clock).
  228. This same bus cycle timing, however, leads to a wait cycle on a 12.5 MHz
  229. processor (4 clocks x 80 nS/clock + 80 nS of idle time).  Thus, the bus
  230. performance is exactly the same, but the faster processor is idled for one
  231. complete clock cycle.  Since a decrease in the bus cycle time provides a
  232. directly proportional increase in processor throughput (until, of course,
  233. the memory cycle becomes faster than the fastest processor bus cycle), the
  234. 12.5 MHz processor has no relative performance advantage over the 10 MHz
  235. system.  The bottom line, then, is that in order to be effective, a higher
  236. speed processor must run with fewer or the same number of "wait states".
  237. This normally requires a redesign of the memory subsystem to improve the
  238. memory access time.
  239.  
  240. Referring to the MC68000 Data Manual (ADI-814-R4), the memory access re-
  241. quirements for the various speed processors can be examined.  The effective
  242. memory access time (Taccs) of the MC68000 to a memory array (from assertion
  243. of Address Strobe [-AS] to data valid) is:
  244.  
  245.         Taccs = Tch + 2Tcyc - Tchs1 - Tdic1 + (n * Tcyc)
  246.  
  247. where:
  248.         Tch     is the clock high time (system dependent)
  249.         Tcyc    is the clock period of the processor clock
  250.         Tchs1   is the delay time from the rising edge of the clock to the
  251.                 assertion of address strobe
  252.         Tdic1   is the data input set-up time prior to the falling edge of
  253.                 the clock
  254.         n       is the number of wait cycles in the system
  255.  
  256. Assuming a symmetric clock (50% duty cycle), the memory speed required for
  257. a no "wait-state" bus cycle for a 19 Mhz MC68000 processor is 185 nS (50 +
  258. 200 - 55 -10 + 0).  This bus speed can be easily realized with readily
  259. available 150 nS dynamic RAMs and careful system design.  However, with the
  260. same assumptions, the memory speed required for a no "wait-state" bus cycle
  261. on a 12.5 Mhz processor is reduced to 135 nS (40 + 160 - 55 - 10 + 0) which
  262. presents an obvious problem to the cost-conscious system designer -- lack of
  263. cost-effective, large capacity 100 nS RAMs!
  264.  
  265. Memory access times are not the only difficulty encountered with the faster
  266. clock speeds.  In a similar vein, the design of an efficient 12.5 MHz system
  267. is more difficult than that of a 10 MHz system, since more careful attention
  268. must be paid to the physical design of the board in order to account for the
  269. higher frequency signals present, and the increased sensitivity to transient
  270. phenomena.
  271.  
  272. A "painless" alternative means to EFFECTIVELY increase system performance
  273. is to upgrade to the MC68010 processor.  The MC68010 at equal clock fre-
  274. quencies will run from 8% to 50% faster than an MC68000 without any user
  275. code changes.  The speed-ups are due to several microcode enhancements:
  276. many 32-bit operations, conditional branches, multiply, divide and other
  277. miscellaneous instructions run faster.  Systems which use memory management
  278. can have dramatic improvements with slight operating system changes 
  279. utilizing a few new MC68010 instructions such as "Move to/from Address
  280. Space" (MOVES).
  281.  
  282. Systems may see a significant improvement if they heavily utilize multiply,
  283. divide and looping operations.  Loops run from 23% to 80% faster once the
  284. microcode sets up the automatic "loop mode".  Such loops benefit particular
  285. functions such as block moves, character matching and general string
  286. manipulation operations, and multiple-precision binary and packed BCD
  287. arithmetic.  The new MC68010 multiply is 14 clocks faster, and the divide
  288. is 32 clocks faster than the MC68000.  Programs utilizing (or with the
  289. potential of utilizing) such operations can obtain an increase in perfor-
  290. mance easily exceeding 10%.
  291.  
  292. An additional "plus" of the MC68010 is the provision of a clear path for 
  293. the upgrade of current operating systems to full virtual operating systems
  294. utilizing the sophisticated virtual memory processing capabilities of the
  295. MC68010 (which is the same virtual environment offered by the 32-bit
  296. MC68020).
  297.  
  298. Since the MC68010 is pin-for-pin compatible with the MC68000, *NO* hardware
  299. redesign is necessary.  Only very minor software changes may have to be
  300. made depending on operating system conventions.  The MC68010 differs from
  301. the MC68000 in that: 1) a generic "vector word" has been added to the
  302. MC68010 stack frame; and 2) the MC68000's "MOVE SR,ea" has been made a
  303. privileged operation.
  304.  
  305. Easy software solutions for these two minor differences are: 1) any routines
  306. which build exception stacks (e.g. those which dispatch a routine via an
  307. RTE instruction) are modified to account for the four word stack frame (the
  308. MC68000 uses a three word stack frame); and 2) an exception handler is added
  309. to provide for privilege violations generated by the execution of the
  310. "MOVE SR,ea" instructions in the USER state (local Motorola representatives
  311. can supply a debugged handler to suit the requirements of any OS).  Major
  312. operating systems have been ported from the MC68000 to the MC68010 in less
  313. than a single day, reflecting the trivial changes required in the super-
  314. visory level code.
  315.  
  316. The bottom line is, by upgrading an MC68000 system to an MC68010 system, an
  317. increase in system performance is obtained which is equal to that which a
  318. system redesign from 10 MHz to 12.5 MHz would provide, but with signifi-
  319. cantly less design cost and effort.  The "speed-only" upgrade could only
  320. achieve, at best, a 25% system improvement, and only if the system memory
  321. access time is significantly improved.  The MC68010 upgrade offers from
  322. 8% to 50% improvement.  Note that the speed gained by changing to the
  323. MC68010 is achieved with NO change in memory speeds, NO board redesign,
  324. and NO higher speed parts installed in the system as would be required to
  325. upgrade a system to a 12.5 MHz part.
  326.  
  327. ---------------------------------------------------------------------------
  328. SIDE NOTES:
  329.  
  330. (1)  Commodore-Amiga has provided for the four word stack frame in Exec.
  331.  
  332. (2)  the DeciGEL program is the privilege violation exception handler.
  333.  
  334. ---------------------------------------------------------------------------
  335. Amiga is a registered trademark of Commodore Business Machines, Inc.
  336.